package com.bazaaroid.server.gae.core.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import javax.jdo.PersistenceManager;

import com.google.appengine.api.datastore.Key;


public interface GenericDAO<T, ID extends Serializable> {

	PersistenceManager getPersistenceManager();

	T getById(ID id);

	List<T> getByKeys(Collection<Key> keys);

	List<T> getAll();

	List<T> getByQuery(String query, String declareParams, Object... params);

	T makePersistent(T entity);

	void deletePersistent(T entity);

	void deleteAll(Collection<Key> keys);

	void flush();

}
